Apache: [error] an unknown filter was not added: PHP

chris (2007-01-05 16:52:48)
5505 views
0 replies
If you are using Apache 2 and php > 4.3.2, you might see this error: 'an unknown filter was not added: PHP. Here is the explanation as posted on the php bugzilla: http://bugs.php.net/bug.php?id=22881

Since 4.3.2RC the default Apache 2 sapi is the apache2handler and is no longer filter based. Therefor you should use

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

and not

<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
</Files>

If you do want to use the old filter sapi, you need to use
--with-apxs2filter option.

So the simple fix for this is to open up your httpd.conf and look for the lines containing SetOutputFilter or SetInputFilter. Comment these lines out, save the file and restart Apache.

This will prevent your error logs from bloating with the unknown filter error.


christo

comment